import os

"""
#config
    配置参数
"""

options = {
    "port": 8080,
    "LOGIN_URL": '/login',
    # "db_host": '192.168.68.135',
    "db_host": '192.168.50.31',
    "db_port": 3306,
    # "db_url": "192.168.68.135:3306",
    "db_url": "192.168.50.31:3306",
    # "db_user": 'root',
    "db_user": 'fop_new_logic',
    # "db_pass": 'root123456',
    "db_pass": 'Jhjf@123',
    # "db_name": 'test',
    "db_name": 'nanshan',
    "db_charset": "utf8"
}

"""
#config
配置文件，相当于django里面的setting
配置application应用程序路由，即文件地址路径
BASE_DIRS = os.path.dirname(__file__)
当前file文件路径
##os.path.join(BASE_DIRS,"static")
拼接路径：如(BASE_DIRS/static)，当然BASE_DIRS=当前文件的父类的文件路径
"""
BASE_DIRS = os.path.dirname(__file__)
print("******config******")
print("BASE_DIRS", BASE_DIRS)

"""
    静态路由配置
"""
STATIC_ROUTERS_CONFIGS = {
    "STATIC_PATH": os.path.join(BASE_DIRS, "static"),
    "CSS_URL": os.path.join(BASE_DIRS, "static", "css"),
    "JS_URL": os.path.join(BASE_DIRS, "static", "js"),
    "IMG_URL": os.path.join(BASE_DIRS, "static", "img")
}

"""
    tornado配置
"""
settings = {
    "static_path": os.path.join(BASE_DIRS, "static"),  # 静态文件
    # "static_url_prefix": "/static",
    "template_path": os.path.join(BASE_DIRS, "templates"),  # 视图
    "compiled_template_cache": True,
    "autoescape": None,
    "debug": True,
    "cookie_secret": "OrGWKG+lTja4QD6jkt0YQJtk+yIUe0VTiy1KaGBIuks",
    "session_secret": "3cdcb1f00803b6e78ab50b466a40b9977db396840c28307f428b25e2277f1bcc",
    "session_timeout": 60,
    "xsrf_cookies": False, # 表单提交（上传文件需要设为False,否则出错）
    "login_url": "/login",
}
